from django.contrib import admin
from .models import GradeDetail

# Register your models here.

@admin.register(GradeDetail)
class GradeDetailAdmin(admin.ModelAdmin):
    list_display = ['id', 'student', 'course_no', 'course_name', 'grade', 'time']
    list_filter = ['time', 'grade']
    search_fields = ['student__username', 'course_name']
    list_per_page = 20
    ordering = ['-time', 'student']
    readonly_fields = ['created_at', 'updated_at']
